package org.jeecg.modules.pos.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.pos.entity.PosThaliInGoods;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.rooms.Vo.CesGoodsVo;

/**
 * @Description: pos_thali_in_goods
 * @Author: jeecg-boot
 * @Date:   2023-04-11
 * @Version: V1.0
 */
public interface PosThaliInGoodsMapper extends BaseMapper<PosThaliInGoods> {

    @Select("<script>select cg.*, ptig.num as thali_num, ptig.required as thali_required from pos_thali_in_goods ptig " +
            "inner join ces_goods cg on cg.id = ptig.goods_id " +
            "where ptig.pos_thali_id in " +
            "<foreach collection='thaliIds' item='id' open='(' separator=',' close=')'> " +
            "#{id} </foreach>" +
            "</script>")
    List<CesGoodsVo> getThaliInGoodsDetail(List<String> thaliIds);
}
